#include<bits/stdc++.h>

using namespace std;

int better(int i ,int j){
    
}

void guessdalao(int n)
{
    int can = 1;
    for (int i = 2; i <= n; i++)
        if (better(i, can) == 1)
            can = i;
    bool right = true;
    for (int i = 1; i <= n; i++)
    {
        if (i == can)
            continue;
        if (better(i, can) || !better(can, i))
        {
            right = false;
            break;
        }
    }
    if (right)
        printf("%d\n", can);
    else
        printf("%d\n", -1);
}